<extend name="Public/common" />
<block name="body">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <tr>
                <td>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="__APP__/Doc/gqmsg" style="font-size: 18px;font-weight: 600;color: #575757;" id="z1">供求信息管理</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="__APP__/Gongqiu/fankui" style="font-size: 18px;font-weight: 600;color: #575757;" id="z2">供求反馈信息管理</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="__APP__/Doc/gqmsg_type" style="font-size: 18px;font-weight: 600;color: #575757;" id="z3">供求类型管理</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="__APP__/Doc/cate" style="font-size: 18px;font-weight: 600;color: #575757;" id="z4">物品分类表</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="__APP__/Doc/money_history" style="font-size: 18px;font-weight: 600;color: #575757;" id="z5">收支记录</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="__APP__/Log/user_log" style="font-size: 18px;font-weight: 600;color: #575757;" id="z6">用户日志</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="__APP__/Log/admin_log" style="font-size: 18px;font-weight: 600;" id="z7">管理员日志</a>
                </td>
            </tr>
            <div class="ibox-content">
                <table class="table table-striped" style="width: 80%;margin: auto;">

                    <tr>
                        <th colspan="5"  style="text-align: center;">管理员操作日志</th>
                        <h5 style="float: right;"><a href="javascript:location.reload();"><i class="fa fa-refresh"></i></a></h5>
                    </tr>
                    <tr>
                        <td colspan="5">

                            <form action="__APP__/log/admin_log" method="post">
                                按操作人：
                                <select name="username" id="">
                                    <foreach name="arr1" item="v">
                                        <option value="{$v.username}">{$v.username}</option>
                                    </foreach>
                                </select>

                                <input type="submit" value="搜索"/>
                            </form>
                        </td>
                    </tr>
                    <tr>
                        <th>操作人姓名</th>
                        <th>登陆IP</th>
                        <th>操作板块</th>
                        <th>时间</th>
                        <th>操作</th>
                    </tr>
                    <form action="__APP__/log/delete" method="post">
                    <foreach name="arr" item="v" key="k">
                        <tr>
                            <td>{$v.username}</td>
                            <td>{$v.addr}</td>
                            <td>{$v.action}</td>
                            <td>{$v.create_time}</td>
                            <td>
                                <input type="checkbox" name="select[]" value="{$v.id}"   />
                            </td>
                        </tr>
                    </foreach>
                    <tr align="center">
                        <td colspan='3'>共{$countnum}页{$page}</td>
                        <td>
                            <input type="hidden" value="admin_log" name="tableName"/>
                            <button type="button" class="btn btn-outline btn-default  btn-xs" id="selectAll">全选</button>
                            <input type="submit" class="btn btn-outline btn-danger  btn-xs" id="deleteAll" value="删除">
                            <input type="submit" class="btn btn-outline  btn-default btn-xs" id="export" value="导出">
                        </td>
                    </tr>
                    </form>
                </table>
            </div>
        </div>
    </div>
    <script type="text/jscript" src="__ROOT__/public/js/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});


        var y=0
        $("#selectAll").click(function () {
            y++
            $("input[name='select[]']").prop("checked",true)
            $("#selectAll").text("取消")
            if(y==2){
                $("input[name='select[]']").prop("checked",false)
                $("#selectAll").text("全选")
                y=0
            }
        })

        $("#export").click(function(){
                $("form").attr("action","__APP__/log/export")
        })

    </script>
</block>






